AMD/microcode: avoid use-after-free for the microcode buffer
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 7 Jan 2014 13:58:35 +0000 (14:58 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jan 2014 13:58:35 +0000 (14:58 +0100)
commita9fe8c7dda440b84e178d65dcd64c0173b0a4b5d
tree5e2c57db2e8e2a108ea08fc1c424b54ffb2d06c1
parent2af30e62c4e562d7a4ec4185fdab20fb29354fd8
AMD/microcode: avoid use-after-free for the microcode buffer

It is possible to free the mc_old buffer and then store it for use in the case
of resume.

This keeps the old semantics of being able to return an error even after a
successful microcode application.

Coverity-ID 1146953
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
xen/arch/x86/microcode_amd.c